#include<iostream>
#include<string.h>
using namespace std;
int main()
{
	char s[1000];
	fgets(s, 1000, stdin);
	int arr[1000] = { 0 };
	int k = 1;
	for (int i = 'a'; i <= 'r'; i++) {
		arr[i] = k++;
		if (k == 4) {
			k = 1;
		}
	}
	for (int i = 't'; i <= 'y'; i++) {
		arr[i] = k++;
		if (k == 4) {
			k = 1;
		}
	}
	arr['s'] = 4;
	arr['z'] = 4;
	arr[' '] = 1;
	int sum = 0;
	for (int i = 0; i < strlen(s) - 1; i++) {
		sum += arr[s[i]];
	}
	cout << sum << endl;
	return 0;
}